package com.su.yield;

public class Task implements Runnable {
	private int count = 10;

	public Task(int count) {
		super();
		this.count = count;
	}

	private static int taskCount = 0;
	private final int taskId = taskCount++;

	@Override
	public void run() {
		while (count-- > 0) {
			System.out.println("--id" + taskId + "---" + count + "---------");
			Thread.yield();

		}

	}

}
